import web
        
urls = (
    '/', 'Index'
)
app = web.application(urls, globals())

class Index:        
    def POST(self):
        #print web.input()
        data = web.input().get('content', '')
        print type(data)
        file('content.txt', 'w').write(data.encode('utf8'))
        return '{"ret": 0, "msg": "ok"}'

if __name__ == "__main__":
    app.run()
